package com.bjdd.jdy.entity;

import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/5/23.
 */

public class PayBean {

    /**
     * package : Sign=WXPay
     * appid : wx000b05d8ed76b3a5
     * sign : AE17B8C54B24CB8EA8416919B398FAFE
     * partnerid : 1446704002
     * prepayid : wx20170523115133592e1df6160391951296
     * noncestr : 1495511506072
     * timestamp : 1495511506
     */

    @SerializedName("package")
    private String packageX;
    private String appid;
    private String sign;
    private String partnerid;
    private String prepayid;
    private String noncestr;
    private String timestamp;

    public static PayBean objectFromData(String str) {

        return new Gson().fromJson(str, PayBean.class);
    }

    public static List<PayBean> arrayPayBeanFromData(String str) {

        Type listType = new TypeToken<ArrayList<PayBean>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public String getPackageX() {
        return packageX;
    }

    public void setPackageX(String packageX) {
        this.packageX = packageX;
    }

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getPartnerid() {
        return partnerid;
    }

    public void setPartnerid(String partnerid) {
        this.partnerid = partnerid;
    }

    public String getPrepayid() {
        return prepayid;
    }

    public void setPrepayid(String prepayid) {
        this.prepayid = prepayid;
    }

    public String getNoncestr() {
        return noncestr;
    }

    public void setNoncestr(String noncestr) {
        this.noncestr = noncestr;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }
}
